FROM golang:alpine
ENV GO111MODULE=on \
    CGO_ENABLED=0 \
    GOOS=linux \
    GOARCH=amd64 \
    GOPROXY="https://goproxy.cn,direct"
WORKDIR /home/code

COPY . .
RUN go build -o app .
WORKDIR /dist
RUN cp /home/code/app .
RUN mkdir src .
EXPOSE 9090
CMD ["/dist/app"]
